using IcsSEMCtrl.Global;
using IcsSEMCtrl.Util.Client;
using Lifter.Device;
using Lifter.Utility;
using Sunny.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Configuration;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using TKT.Lifter.CIM.Lifter.Global;
using TKT.Lifter.CIM.Lifter.Gui.Monitor.Popups;

namespace Lifter.Gui.Monitor.Panels
{
	public class InformPLC : InformLogMenu
	{
		private delegate void LogReadDelegate();
		private delegate void AddDataGrid(string readString);
		private Thread threadSearch = null;
		private IContainer components = null;
		private DataGridView dataGridView;
        private Panel panelProgress;
        private Sunny.UI.UIPanel panelSearch;
        private Sunny.UI.UISymbolButton buttonSearch;
        private Sunny.UI.UIPanel uiPanel;
        private Label labelMessage;
        private UIMarkLabel uiMarkLabel3;
        private UIComboBox ToDate;
        private UIDatePicker selectDay;
        private UIComboBox fromDate;
        private UIMarkLabel uiMarkLabel1;
        private UIMarkLabel lbStartTime;
        private string saveFilePath = "";
		public InformPLC()
		{
			this.InitializeComponent();
			this.InitializeDataGrid();
			this.selectDay.Value = DateTime.Now;
		}
		private void InitializeDataGrid()
		{
			try
			{
				this.dataGridView.AllowUserToAddRows = true;
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
				this.dataGridView.Columns[0].HeaderText = "Date & Time";
				this.dataGridView.Columns[1].HeaderText = "RD/WR";
				this.dataGridView.Columns[2].HeaderText = "Message ID";
				this.dataGridView.Columns[3].HeaderText = "Device";
				this.dataGridView.Columns[4].HeaderText = "Current Value";
				this.dataGridView.Columns[5].HeaderText = "Previous Value";
				this.dataGridView.Columns[6].HeaderText = "Address";
				this.dataGridView.Columns[0].Width = 160;
				this.dataGridView.Columns[0].Resizable = DataGridViewTriState.False;
				this.dataGridView.Columns[1].Width = 75;
				this.dataGridView.Columns[2].Width = 200;
				this.dataGridView.Columns[2].Resizable = DataGridViewTriState.False;
				this.dataGridView.Columns[3].Width = 120;
				this.dataGridView.Columns[3].Resizable = DataGridViewTriState.False;
				this.dataGridView.Columns[4].Width = 200;
				this.dataGridView.Columns[5].Width = 200;
				this.dataGridView.Columns[6].Width = 400;
				this.dataGridView.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.False;
				this.dataGridView.AllowUserToAddRows = false;
			}
			catch (Exception)
			{
			}
		}
		private void buttonSearch_Click(object sender, EventArgs e)
		{
			if (this.threadSearch == null)
			{
				this.threadSearch = new Thread(new ThreadStart(this.ObservableLogRead));
			}
			if (this.threadSearch.ThreadState != ThreadState.Running)
			{
				if (this.threadSearch.ThreadState == ThreadState.Stopped)
				{
					this.threadSearch = new Thread(new ThreadStart(this.ObservableLogRead));
					this.threadSearch.Start();
				}
				else
				{
					if (this.threadSearch.ThreadState == ThreadState.Stopped)
					{
						this.threadSearch.Start();
					}
					else
					{
						if (this.threadSearch.ThreadState == ThreadState.Unstarted)
						{
							this.threadSearch.Start();
						}
					}
				}
			}
		}
		private void StartSearch()
		{
			this.panelProgress.BringToFront();
			this.labelMessage.Text = "正在查询数据。请稍等。";
			this.dataGridView.Rows.Clear();
			this.dataGridView.Enabled = false;
			this.panelSearch.Enabled = false;
		}
		private void EndSearch()
		{
			this.panelSearch.Enabled = true;
			this.dataGridView.Enabled = true;
			this.panelProgress.SendToBack();
			this.dataGridView.Sort(this.dataGridView.Columns[0], ListSortDirection.Descending);
			foreach (DataGridViewRow dataGridViewRow in this.dataGridView.SelectedRows)
			{
				dataGridViewRow.Selected = false;
			}
		}
		private void StartSave()
		{
			this.panelProgress.BringToFront();
			this.labelMessage.Text = "正在保存数据。请稍等。";
			this.dataGridView.Enabled = false;
			this.panelSearch.Enabled = false;
		}
		private void EndSave()
		{
			this.panelSearch.Enabled = true;
			this.panelSearch.Enabled = true;
			this.dataGridView.Enabled = true;
			this.panelProgress.SendToBack();
		}
		private void ObservableLogRead()
		{
			try
			{
				base.BeginInvoke(new InformPLC.LogReadDelegate(this.StartSearch));
				NameValueCollection appSettings = ConfigurationManager.AppSettings;
				string path = appSettings[ECPProperties.ECP_LOG].ToString() + "\\Log\\Statistics\\OBSERVABLE";
				List<FileInfo> filesForReading = this.GetFilesForReading(path);
				foreach (FileInfo current in filesForReading)
				{
					StringBuilder stringBuilder = new StringBuilder();
					using (StreamReader streamReader = new StreamReader(new FileStream(current.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
					{
						if (streamReader == null || current.Length == 0L)
						{
							continue;
						}
						stringBuilder = new StringBuilder(streamReader.ReadToEnd());
					}
					if (stringBuilder != null)
					{
						string[] array = stringBuilder.ToString().Split(new char[]
						{
							'\n'
						});
						for (int i = 0; i < array.Length; i++)
						{
							string text = array[i];
							if (text != null)
							{
								object[] args = new object[]
								{
										text
								};
								base.BeginInvoke(new InformPLC.AddDataGrid(this.AddLogData), args);
							}
						}
					}
				}
				base.BeginInvoke(new InformPLC.LogReadDelegate(this.EndSearch));
			}
			catch(Exception e)
			{
				PopupNotice.DialogPopups(e.Message, e.Message, enumPopupsType.Error);
				base.BeginInvoke(new InformPLC.LogReadDelegate(this.EndSearch));
			}
		}
		private void AddLogData(string readString)
		{
			string[] array = readString.Split(new char[]
			{
				'/'
			});
			try
			{
				DataGridViewRow dataGridViewRow = new DataGridViewRow();
				if (array.Length >= 8)
				{
					int index = this.dataGridView.Rows.Add(dataGridViewRow);
					for (int i = 0; i < array.Length; i++)
					{
						switch (i)
						{
							case 0:
								this.dataGridView.Rows[index].Cells[0].Value = array[0];
								break;
							case 2:
								{
									string text = array[2];
									text = array[2].Replace("CIM READ <<< ", "");
									text = text.Replace("CIM WRITE>>> ", "");
									if (array[2].StartsWith("CIM READ"))
									{
										this.dataGridView.Rows[index].Cells[1].Value = "◀READ";
										this.dataGridView.Rows[index].Cells[2].Value = text;
										DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
										dataGridViewCellStyle.BackColor = Color.LightSkyBlue;
										this.dataGridView.Rows[index].Cells[1].Style = dataGridViewCellStyle;
									}
									else
									{
										this.dataGridView.Rows[index].Cells[1].Value = "WRITE▶";
										this.dataGridView.Rows[index].Cells[2].Value = text;
										DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
										dataGridViewCellStyle.BackColor = Color.OrangeRed;
										this.dataGridView.Rows[index].Cells[1].Style = dataGridViewCellStyle;
									}
									DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
									dataGridViewCellStyle2.BackColor = Color.Goldenrod;
									this.dataGridView.Rows[index].Cells[2].Style = dataGridViewCellStyle2;
									break;
								}
							case 3:
								this.dataGridView.Rows[index].Cells[3].Value = array[3];
								if (array[3].Trim().EndsWith("01"))
								{
									DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
									dataGridViewCellStyle.BackColor = Color.PaleGreen;
									this.dataGridView.Rows[index].Cells[3].Style = dataGridViewCellStyle;
								}
								else
								{
									if (array[3].Trim().EndsWith("02"))
									{
										DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
										dataGridViewCellStyle.BackColor = Color.PaleTurquoise;
										this.dataGridView.Rows[index].Cells[3].Style = dataGridViewCellStyle;
									}
									else
									{
										DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
										dataGridViewCellStyle.BackColor = Color.LightSteelBlue;
										this.dataGridView.Rows[index].Cells[3].Style = dataGridViewCellStyle;
									}
								}
								break;
							case 5:
								this.dataGridView.Rows[index].Cells[5].Value = array[5];
								break;
							case 6:
								{
									this.dataGridView.Rows[index].Cells[4].Value = array[6];
									DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
									dataGridViewCellStyle3.BackColor = Color.LightSeaGreen;
									this.dataGridView.Rows[index].Cells[4].Style = dataGridViewCellStyle3;
									break;
								}
							case 8:
								{
									this.dataGridView.Rows[index].Cells[6].Value = array[8];
									DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
									dataGridViewCellStyle4.BackColor = Color.WhiteSmoke;
									this.dataGridView.Rows[index].Cells[6].Style = dataGridViewCellStyle4;
									break;
								}
						}
					}
				}
			}
			catch (Exception)
			{
			}
			finally
			{
			}
		}
		private List<FileInfo> GetFilesForReading(string path)
		{
			FileInfo[] files = new DirectoryInfo(path).GetFiles("OBSERVABLE-*.log");
			List<FileInfo> list = new List<FileInfo>();
			DateTimeConverter dateTimeConverter = new DateTimeConverter();
			DateTime dateTime = (DateTime)dateTimeConverter.ConvertFromString(this.fromDate.Text);
			DateTime dateTime2 = (DateTime)dateTimeConverter.ConvertFromString(this.ToDate.Text);
			while (dateTime.Ticks <= dateTime2.Ticks)
			{
				FileInfo[] array = files;
				for (int i = 0; i < array.Length; i++)
				{
					FileInfo fileInfo = array[i];
					if (fileInfo.Name.StartsWith("OBSERVABLE-" + dateTime.ToString("yyyy-MM-dd")))
					{
						list.Add(fileInfo);
					}
				}
				dateTime = dateTime.AddDays(1.0);
			}
			list.Sort(new DinoComparer());
			if (list.Count > 3)
			{
				list.RemoveRange(0, list.Count - 3);
			}
			return list;
		}
		private void buttonSaveToCVS_Click(object sender, EventArgs e)
		{
			if (this.dataGridView.Rows.Count <= 0)
			{
				PopupNotice.DialogPopups("没有可保存的资料.", "No data to save", enumPopupsType.Warning);
			}
			else
			{
				if (this.dataGridView.SelectedRows.Count == 0)
				{
					PopupNotice.DialogPopups("请选择要保存的部分。[CTRL-A]为全选.", "No data to save", enumPopupsType.Warning);
				}
				else
				{
					string dir = "";
					if (DirEx.SelectDirEx("选择保存文件路径", ref dir))
					{
						this.saveFilePath = dir;
						new Thread(new ThreadStart(this.SaveToCVS)).Start();
					}
				}
			}
		}
		private void SaveToCVS()
		{
			base.BeginInvoke(new InformPLC.LogReadDelegate(this.StartSave));
			LifterSEM lifterSEM = (LifterSEM)Naming.GetDeviceManager().GetDevice();
			string text2 = lifterSEM.HostID + "_PLC_" + DateTime.Now.ToString("yyyy-MM-dd HHmmssfff") + ".csv";
			try
			{
				if (!Directory.Exists(saveFilePath))
				{
					Directory.CreateDirectory(saveFilePath);
				}
				using (StreamWriter streamWriter = new StreamWriter(new FileStream(saveFilePath + text2, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite)))
				{
					StringBuilder stringBuilder = new StringBuilder();
					foreach (DataGridViewRow dataGridViewRow in (IEnumerable)this.dataGridView.Rows)
					{
						if (dataGridViewRow.Selected)
						{
							string text3 = "";
							foreach (DataGridViewCell dataGridViewCell in dataGridViewRow.Cells)
							{
								text3 = text3 + dataGridViewCell.Value + '\t';
							}
							streamWriter.WriteLine(text3.Trim());
							Thread.Sleep(0);
						}
					}
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine(ex.StackTrace);
				base.BeginInvoke(new InformPLC.LogReadDelegate(this.EndSave));
			}
			finally
			{
				base.BeginInvoke(new InformPLC.LogReadDelegate(this.EndSave));
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
            this.dataGridView = new System.Windows.Forms.DataGridView();
            this.panelProgress = new System.Windows.Forms.Panel();
            this.labelMessage = new System.Windows.Forms.Label();
            this.panelSearch = new Sunny.UI.UIPanel();
            this.uiMarkLabel3 = new Sunny.UI.UIMarkLabel();
            this.ToDate = new Sunny.UI.UIComboBox();
            this.selectDay = new Sunny.UI.UIDatePicker();
            this.fromDate = new Sunny.UI.UIComboBox();
            this.uiMarkLabel1 = new Sunny.UI.UIMarkLabel();
            this.lbStartTime = new Sunny.UI.UIMarkLabel();
            this.buttonSearch = new Sunny.UI.UISymbolButton();
            this.uiPanel = new Sunny.UI.UIPanel();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
            this.panelProgress.SuspendLayout();
            this.panelSearch.SuspendLayout();
            this.uiPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // dataGridView
            // 
            this.dataGridView.AllowUserToOrderColumns = true;
            this.dataGridView.AllowUserToResizeRows = false;
            dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.White;
            this.dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
            this.dataGridView.BackgroundColor = System.Drawing.Color.AliceBlue;
            this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.dataGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Desktop;
            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
            this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White;
            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dataGridView.DefaultCellStyle = dataGridViewCellStyle3;
            this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
            this.dataGridView.GridColor = System.Drawing.Color.DarkGray;
            this.dataGridView.Location = new System.Drawing.Point(0, 0);
            this.dataGridView.Name = "dataGridView";
            this.dataGridView.ReadOnly = true;
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle4.BackColor = System.Drawing.Color.DimGray;
            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
            this.dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
            this.dataGridView.RowHeadersVisible = false;
            this.dataGridView.RowHeadersWidth = 20;
            this.dataGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.White;
            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle5;
            this.dataGridView.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dataGridView.RowTemplate.Height = 23;
            this.dataGridView.RowTemplate.ReadOnly = true;
            this.dataGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.dataGridView.ShowCellErrors = false;
            //this.dataGridView.ShowCellToolTips = false;
            this.dataGridView.ShowEditingIcon = false;
            this.dataGridView.ShowRowErrors = false;
            this.dataGridView.Size = new System.Drawing.Size(983, 572);
            this.dataGridView.TabIndex = 20;
            // 
            // panelProgress
            // 
            this.panelProgress.BackColor = System.Drawing.SystemColors.ControlLight;
            this.panelProgress.Controls.Add(this.labelMessage);
            this.panelProgress.Location = new System.Drawing.Point(218, 166);
            this.panelProgress.Name = "panelProgress";
            this.panelProgress.Padding = new System.Windows.Forms.Padding(2);
            this.panelProgress.Size = new System.Drawing.Size(509, 55);
            this.panelProgress.TabIndex = 21;
            // 
            // labelMessage
            // 
            this.labelMessage.BackColor = System.Drawing.Color.RoyalBlue;
            this.labelMessage.Dock = System.Windows.Forms.DockStyle.Fill;
            this.labelMessage.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.labelMessage.ForeColor = System.Drawing.Color.MistyRose;
            this.labelMessage.Location = new System.Drawing.Point(2, 2);
            this.labelMessage.Name = "labelMessage";
            this.labelMessage.Size = new System.Drawing.Size(505, 51);
            this.labelMessage.TabIndex = 0;
            this.labelMessage.Text = "正在查看日志信息。请稍等";
            this.labelMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // panelSearch
            // 
            this.panelSearch.Controls.Add(this.uiMarkLabel3);
            this.panelSearch.Controls.Add(this.ToDate);
            this.panelSearch.Controls.Add(this.selectDay);
            this.panelSearch.Controls.Add(this.fromDate);
            this.panelSearch.Controls.Add(this.uiMarkLabel1);
            this.panelSearch.Controls.Add(this.lbStartTime);
            this.panelSearch.Controls.Add(this.buttonSearch);
            this.panelSearch.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panelSearch.Font = new System.Drawing.Font("微软雅黑", 12F);
            this.panelSearch.Location = new System.Drawing.Point(0, 572);
            this.panelSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.panelSearch.MinimumSize = new System.Drawing.Size(1, 1);
            this.panelSearch.Name = "panelSearch";
            this.panelSearch.Radius = 1;
            this.panelSearch.Size = new System.Drawing.Size(983, 40);
            this.panelSearch.TabIndex = 24;
            this.panelSearch.Text = null;
            this.panelSearch.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
            this.panelSearch.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // uiMarkLabel3
            // 
            this.uiMarkLabel3.AutoSize = true;
            this.uiMarkLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiMarkLabel3.Location = new System.Drawing.Point(404, 8);
            this.uiMarkLabel3.Name = "uiMarkLabel3";
            this.uiMarkLabel3.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
            this.uiMarkLabel3.Size = new System.Drawing.Size(79, 22);
            this.uiMarkLabel3.TabIndex = 108;
            this.uiMarkLabel3.Text = "结束小时";
            this.uiMarkLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.uiMarkLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // ToDate
            // 
            this.ToDate.DataSource = null;
            this.ToDate.FillColor = System.Drawing.Color.White;
            this.ToDate.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.ToDate.Items.AddRange(new object[] {
            "00",
            "01",
            "02",
            "03",
            "04",
            "05",
            "06",
            "07",
            "08",
            "09",
            "10",
            "12",
            "13",
            "14",
            "15",
            "16",
            "17",
            "18",
            "19",
            "20",
            "21",
            "22",
            "23",
            "24"});
            this.ToDate.Location = new System.Drawing.Point(490, 5);
            this.ToDate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.ToDate.MinimumSize = new System.Drawing.Size(63, 0);
            this.ToDate.Name = "ToDate";
            this.ToDate.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
            this.ToDate.Size = new System.Drawing.Size(77, 29);
            this.ToDate.TabIndex = 107;
            this.ToDate.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.ToDate.Watermark = "";
            this.ToDate.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // selectDay
            // 
            this.selectDay.FillColor = System.Drawing.Color.White;
            this.selectDay.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.selectDay.Location = new System.Drawing.Point(81, 3);
            this.selectDay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.selectDay.MaxLength = 10;
            this.selectDay.MinimumSize = new System.Drawing.Size(63, 0);
            this.selectDay.Name = "selectDay";
            this.selectDay.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
            this.selectDay.Size = new System.Drawing.Size(140, 32);
            this.selectDay.SymbolDropDown = 61555;
            this.selectDay.SymbolNormal = 61555;
            this.selectDay.TabIndex = 104;
            this.selectDay.Text = "2024-03-25";
            this.selectDay.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.selectDay.Value = new System.DateTime(2024, 3, 25, 15, 6, 10, 444);
            this.selectDay.Watermark = "";
            this.selectDay.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // fromDate
            // 
            this.fromDate.DataSource = null;
            this.fromDate.FillColor = System.Drawing.Color.White;
            this.fromDate.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.fromDate.Items.AddRange(new object[] {
            "00",
            "01",
            "02",
            "03",
            "04",
            "05",
            "06",
            "07",
            "08",
            "09",
            "10",
            "12",
            "13",
            "14",
            "15",
            "16",
            "17",
            "18",
            "19",
            "20",
            "21",
            "22",
            "23",
            "24"});
            this.fromDate.Location = new System.Drawing.Point(321, 4);
            this.fromDate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.fromDate.MinimumSize = new System.Drawing.Size(63, 0);
            this.fromDate.Name = "fromDate";
            this.fromDate.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
            this.fromDate.Size = new System.Drawing.Size(77, 29);
            this.fromDate.TabIndex = 106;
            this.fromDate.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.fromDate.Watermark = "";
            this.fromDate.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // uiMarkLabel1
            // 
            this.uiMarkLabel1.AutoSize = true;
            this.uiMarkLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiMarkLabel1.Location = new System.Drawing.Point(3, 6);
            this.uiMarkLabel1.Name = "uiMarkLabel1";
            this.uiMarkLabel1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
            this.uiMarkLabel1.Size = new System.Drawing.Size(79, 22);
            this.uiMarkLabel1.TabIndex = 103;
            this.uiMarkLabel1.Text = "查询时间";
            this.uiMarkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.uiMarkLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // lbStartTime
            // 
            this.lbStartTime.AutoSize = true;
            this.lbStartTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lbStartTime.Location = new System.Drawing.Point(244, 8);
            this.lbStartTime.Name = "lbStartTime";
            this.lbStartTime.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
            this.lbStartTime.Size = new System.Drawing.Size(79, 22);
            this.lbStartTime.TabIndex = 105;
            this.lbStartTime.Text = "开始小时";
            this.lbStartTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.lbStartTime.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // buttonSearch
            // 
            this.buttonSearch.Cursor = System.Windows.Forms.Cursors.Hand;
            this.buttonSearch.Font = new System.Drawing.Font("微软雅黑", 12F);
            this.buttonSearch.Location = new System.Drawing.Point(574, 4);
            this.buttonSearch.MinimumSize = new System.Drawing.Size(1, 1);
            this.buttonSearch.Name = "buttonSearch";
            this.buttonSearch.Size = new System.Drawing.Size(100, 32);
            this.buttonSearch.Style = Sunny.UI.UIStyle.Custom;
            this.buttonSearch.StyleCustomMode = true;
            this.buttonSearch.Symbol = 361442;
            this.buttonSearch.TabIndex = 82;
            this.buttonSearch.Text = "查询";
            this.buttonSearch.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.buttonSearch.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            this.buttonSearch.Click += new System.EventHandler(this.buttonSearch_Click);
            // 
            // uiPanel
            // 
            this.uiPanel.Controls.Add(this.dataGridView);
            this.uiPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.uiPanel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiPanel.Location = new System.Drawing.Point(0, 0);
            this.uiPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.uiPanel.MinimumSize = new System.Drawing.Size(1, 1);
            this.uiPanel.Name = "uiPanel";
            this.uiPanel.Size = new System.Drawing.Size(983, 572);
            this.uiPanel.TabIndex = 25;
            this.uiPanel.Text = "uiPanel2";
            this.uiPanel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
            this.uiPanel.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
            // 
            // InformPLC
            // 
            this.Controls.Add(this.uiPanel);
            this.Controls.Add(this.panelSearch);
            this.Controls.Add(this.panelProgress);
            this.Name = "InformPLC";
            this.Size = new System.Drawing.Size(983, 612);
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
            this.panelProgress.ResumeLayout(false);
            this.panelSearch.ResumeLayout(false);
            this.panelSearch.PerformLayout();
            this.uiPanel.ResumeLayout(false);
            this.ResumeLayout(false);

		}
	}
}
